package com.example.smartcity_poverty.ui.SmartSubject.AllSubjectActivity.PovertyActivity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MenuItem
import com.example.smartcity_poverty.R
import com.example.smartcity_poverty.ui.SmartSubject.SetSubjectData.getSubjectArray
import kotlinx.android.synthetic.main.activity_poverty_home.*

class PovertyHomeActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_poverty_home)
        // 显示回退按钮
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
        // 设置标题
        intent.getStringExtra("title").let {
            title = this.toString()
        }

    }

    /**
     * 点击回退按钮时， 销毁该意图！
     */
    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        finish()
        return super.onOptionsItemSelected(item)
    }
}